from bs4 import BeautifulSoup as bs
import requests
from lxml import etree
import os

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36',
   }


#htmlText = requests.get('https://gitee.com/customers', headers=headers).text
with open(os.path.join(os.environ['USERPROFILE'], r'Desktop\htmlTest.html'),'r') as fileTest:
    text = fileTest.read()
    soup = bs(text,'html.parser')
    print(soup.title.string)
    print(soup.title.text)



